home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / unix / linuxfaq / faq < prev    next >
Encoding:
Text File  |  1992-02-03  |  33.1 KB  |  881 lines

  1. Newsgroups: alt.os.linux
  2. Path: socrates!haven.umd.edu!darwin.sura.net!wupost!think.com!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!daemon
  3. From: corsini@labri (Marc CORSINI)
  4. Subject: FAQ (monthly post)
  5. Message-ID: <1992Feb3.100213.4171@athena.mit.edu>
  6. Sender: daemon@athena.mit.edu (Mr Background)
  7. Reply-To: corsini@labri (Marc CORSINI)
  8. Organization: The Internet
  9. Date: Mon, 3 Feb 1992 10:02:13 GMT
  10. Lines: 868
  11.  
  12.  
  13. Hi Linuxers!
  14.  
  15. The originall FAQ 1st version was posted in Dec. 19, by Robert Blum,
  16.  
  17. Most credits of this work to Linus, Robert and Ted, the rest was
  18. either on the list posted by many (real) activists, not me ;-), either
  19. in some other news groups, or else by direct posting to me (I haven't
  20. copyrighted them, so thanks to every one who participated even
  21. indirectly to this FAQ).
  22.  
  23. [To find what has changed, view the `Cdiff-faq' posting. As this FAQ
  24. organization is not stable yet, Cdiff-faq is twice bigger as the whole
  25. stuff :) and will not be posted this time. The last-change-date of
  26. this posting is always "two minutes ago".  :-)]
  27.  
  28. This is the introduction to a list of frequently asked questions (FAQ
  29. for short) about Linux with answers (Yeap!).  This article contains a
  30. listing of the sections, followed by the question/answer part.
  31.  
  32. This FAQ is supposed to reduce the noise level ;-) in the alt.os.linux
  33. newsgroup (and also the 'linux-activists' mailing list), and spare the
  34. time of many activists.
  35.  
  36. Please suggest any change, rephrasing, deletions, new questions,
  37. answers ...  
  38. Please include "FAQ" in the subject of messages sent to me about FAQ.  
  39. Please use corsini@labri.greco-prog.fr whatever will be the From part 
  40. of this message.
  41.  
  42.  
  43. Thanks in advance,
  44.                 Marc <corsini@labri.greco-prog.fr>
  45.  
  46. Remind the vote in Feb. 18th for comp.os.linux
  47.  
  48. Future Plan:
  49.     - make available Cdiff of the FAQ last release.
  50.     - mark question/answer that have heavily changed recently
  51.     - verification/location/organization for files available 
  52.     via FTP
  53.     - cross posting this to news.answers as soon as comp.os.linux 
  54.     is created
  55.  
  56. ================================8<=====8<==============================
  57. CONTENTS
  58.     I.    LINUX GENERAL INFORMATION
  59.     II.    LINUX USEFUL ADRESSES
  60.     III.    INSTALLATION and SECURITY
  61.     IV.    LINUX and DOS
  62.     V.    SOME CLASSICAL PROBLEMS
  63.     VI.    INSTALLATION HINTS
  64.     VII.    FEATURES
  65.  
  66. I. LINUX GENERAL INFORMATION 
  67. =============================
  68.  
  69. QUESTION: What is linux?
  70.  
  71. ANSWER: Linux is a small unix for 386-AT computers, that has the added
  72. advantage of being free. It is still in beta-testing, but is slowly
  73. getting useful even for somewhat real developement.  The current
  74. version is 0.12, date: Jan. 14th 1992. The next version will come out
  75. in the end of Feb.
  76.  
  77.    LINUX 0.12 is a freely distributable UNIX clone.  It implements a
  78. subset of System V and POSIX functionality.  LINUX has been written
  79. from scratch, and therefore does not contain any AT&T or MINIX
  80. code--not in the kernel, the compiler, the utilities, or the
  81. libraries.  For this reason it can be made available with the complete
  82. source code via anonymous FTP.  LINUX runs only on 386/486 AT-bus
  83. machines; porting to non-Intel architectures is likely to be
  84. difficult, as the kernel makes extensive use of 386 memory management
  85. and task primitives.
  86.  
  87.  
  88. QUESTION: I've just heard about linux, what should I do to get it?
  89.  
  90. ANSWER: First read all this FAQ, and the INFO-SHEET monthly post, then
  91. go to the nearest ftp site (see below), download the Images there are
  92. two a rootimage and a bootimage (in general in the images directory),
  93. download the INSTALL and RELNOTES files.  Find the rawrite utility
  94. (for example at tsx-11 it's in /pub/linux/INSTALL), then rawrite the
  95. images on high density floppies (5.25 or 3.5), finally boot on the
  96. root diskette and that's it.
  97.  
  98.  
  99. QUESTION: Does it run on my computer?
  100.  
  101. ANSWER: Linux has been written on a clone-386, with IDE drives and a
  102. VGA screen. It should work on most similar setups. The harddisk should
  103. be AT-standard, and the system must be ISA.  A high density floppy
  104. drive -- either 5".25 or 3".5
  105.  
  106. Otherwise the requirements seem relatively small: a 386 (SX, DX or any
  107. 486).  Any video card of the following: Hercules, CGA, EGA, (S)VGA.
  108.  
  109. It needs at least 2M to run, and 4M is definitely a plus. It can
  110. happily use up to 16M (and more if you change some things).  People
  111. are working on a SCSI-driver.
  112.  
  113. BTW it works for some ESDI drive (Joincom controller with Magtron
  114. drive after you have commented out the "unexpected hd interrupt"-message
  115. from hd.c). And quite recently for some SCSI adapter (adaptech-1542)
  116. by Tommy Thorn in digest19 vol#1 of alt.os.linux.
  117.  
  118.  
  119. QUESTION: How would this operate in an OS/2 environment?
  120.  
  121. ANSWER: Fine.
  122.  
  123.  
  124. QUESTION: Will linux run on a PC or 286-AT? If not, why?
  125.  
  126. ANSWER: Linux uses the 386 chip protected mode functions extensively,
  127. and is a true 32-bit operating system. Thus x86 chips, x<3, will
  128. simply not run it.
  129.  
  130.  
  131. QUESTION: How big is the 'complete' Linux package?
  132.  
  133. ANSWER: Well, the boot and root image diskettes are about 750k
  134. compressed.  The kernel sources are about 200k compressed, and the
  135. libc sources are another 170k compressed.  The GNU C compiler is 670k,
  136. and the other miscellaneous unix utilities are probably a bit over a
  137. megabyte.
  138.  
  139. Now add sources to whatever you want to port and compile yourself.
  140. The sources to GNU emacs are about 3 megabytes, compressed.  Groff (a
  141. troff replacement) is just over 1 megabyte.
  142.  
  143. If you think this is big, remember that the OS/2 2.0 Limited
  144. Availability release is 20 1.44 megabyte diskettes.
  145.  
  146.  
  147. QUESTION: Since how long does linux exist?
  148.  
  149. ANSWER (partial): Few months, v0.10 went out in Nov. 91, v0.11 in Dec.
  150. and the current version 0.12 is available since Jan. 14th 92. But even
  151. it is pretty recent it is quite reliable. There are very few and small
  152. bugs and in its current state it is mostly useful for people who are
  153. willing to port code and write new code.
  154.  
  155.  
  156. QUESTION: What's about the copywright of linux.
  157.  
  158. ANSWER: In the previous release, Linux was copyrighted by Linus
  159. Torvalds but free. The copyright will change (v0.13 ?) to follows the
  160. same set of rules as the GNU copyleft.
  161.  
  162.  
  163. QUESTION: Should I be a UNIX and/or a DOS wizard to install/use Linux?
  164.  
  165. ANSWER: Not at all, just follow the install rules, of course it will be
  166. easier for you if you know things about Unix. Right now Linux is used
  167. by more than 400 persons, very few of them enhance the kernel, some
  168. adds/ports new soft and most of us are only (but USEFUL) beta testers.
  169. So join us and choose your "cast"
  170.  
  171.  
  172. QUESTION: What are the differences, pros and cons compared to Minix ?
  173.  
  174. ANSWER (partial): 
  175. Cons: 
  176. - Linux is not as mature as Minix, there is less working software right now.  
  177. - Linux v0.12 doesn't have real login yet, you are root all the time.  
  178.     this will change pretty soon probably in the next version (end Feb.)
  179. - Linux only works on 386 and 486 processors.  
  180. - Linux needs 2M of memory just to run, 4M to be useful.  
  181. - Linux is a more traditional unix kernel, it doesn't use message passing.
  182.  
  183. Pros: 
  184. - Linux is free, and freely distributable.  
  185. - Linux has some advanced features such as:
  186.   - Memory paging with copy-on-write
  187.   - Demand loading of executables
  188.   - Page sharing of executables
  189.   - Multi-threaded file system
  190.   - job control and virtual memory, virtual consoles and pseudo-ttys.
  191. - Linux is a more traditional unix kernel, it doesn't use message
  192. passing.
  193.  
  194.  
  195. QUESTION: Does Linux use TSS segments to provide multitasking?
  196.  
  197. ANSWER: Yes!
  198.  
  199.  
  200. QUESTION: If my PC runs under Linux, is it possible to ftp, rlogin,
  201. rsh etc.. to other Unix boxes?
  202.  
  203. ANSWER: Not yet, but kermit has been ported to Linux.
  204.  
  205.  
  206. QUESTION: Does linux do paging? Can I have virtual memory on my small
  207. machine?
  208.  
  209. ANSWER: Linux0.12 does do paging, but it's pretty rudimentary. It's
  210. even more beta than the rest of linux. How it selects which page to be
  211. thrown out of memory is particularly primitive. It is there though and
  212. it does appear to work
  213.  
  214.  
  215. QUESTION: Can I have tasks spanning the full 4GB of addressable 386
  216. memory? No more 64kB limits like in coherent or standard minix?
  217.  
  218. ANSWER: Linux does limit the task-size, but at a much more reasonable
  219. 64MB (MEGA-byte, not kilos), so bigger programs are no problem.
  220.  
  221.  
  222. QUESTION: Does the bigger program sizes mean I can run X?
  223.  
  224. ANSWER: X is not ported to linux, and though I hope it will be some
  225. day, I cannot guarantee it. It's big, and wants a lot from the system.
  226.  
  227.  
  228. II. LINUX USEFUL ADRESSES 
  229. =========================
  230.  
  231. QUESTION: Where can I get linux?
  232.  
  233. ANSWER: Linux can be gotten by anonymous ftp from
  234.     nic.funet.fi (128.214.6.100):
  235.         directory /pub/OS/Linux
  236.     Tupac-Amaru.Informatik.RWTH-Aachen.DE (137.226.112.31):
  237.         directory /pub/msdos/replace
  238.     tsx-11.mit.edu (18.172.1.2):
  239.         directory /pub/linux
  240.     ftp.eecs.umich.edu (141.212.99.7):
  241.         directory linux
  242.         puffin.doc.ic.ac.uk (146.169.3.7):
  243.         directory /pub/os/Linux
  244.  
  245. You might want to check out which of these is the most up-to-date.
  246.  
  247. If you don't have ftp-capability, you are in trouble. See next Q/A.  If
  248. you have no uncompress utility, there are a lot even for DOS, have a
  249. look on SIMTEL, or else use facilities provided by some sites to
  250. uncompress for you. Don't do that if you can, because it's lengthy,
  251. expensive and causes troubles to other users on ftp sites.
  252.  
  253.  
  254. QUESTION: I do not have FTP access, what can I do to get linux?
  255.  
  256. ANSWER: Try to contact a friend on the net with those access, or try
  257. mailserver/ftpmail server otherwise contact tytso@ATHENA.MIT.EDU. You
  258. might try mailing "mailserver@nic.funet.fi" with "help" in the body of
  259. the mail.  If you choose ftpmail server (example: ftpmail@decwrl.dec.com),
  260. with "help" in the body, the server will send back instructions and
  261. command list. As an exemple to get the list of files available at tsx-11
  262. in /pub/linux send:
  263.  
  264.         mail ftpmail@decwrl.dec.com
  265.         subject: anything
  266.         reply <your e-mail>
  267.         connect tsx-11.mit.edu
  268.         chdir /pub/linux
  269.         dir -R
  270.         quit
  271.  
  272. QUESTION: Is there a newsgroup or mailing-list about linux? Where can
  273. I get my questions answered? How about bug-reports?
  274.  
  275. ANSWER: alt.os.linux is formed, and comp.os.linux is on the way, for
  276. those who can't access to the news you can ask for digest to:
  277. Linux-Activists-request@NEWS-DIGESTS.MIT.EDU. On the other hand, mail
  278. sent to Linux-Activists@NEWS-DIGESTS.MIT.EDU are posted to
  279. alt.os.linux
  280.  
  281. DO NOT mail "I want to [un]subscribe" to the mailing-list/news, use
  282. the request-address. IF not your mail-box will be over-crowded by
  283. activists.
  284.  
  285. Questions and bug-reports can be sent either to the mailing-list or to
  286. "torvalds@kruuna.helsinki.fi", depending on which you find more
  287. appropriate.
  288.  
  289. BTW People are working on the organization of Linux, this is done on
  290. an apart mailing-list.
  291.  
  292. linux-standards: Discussion of distribution and directory standards
  293. for the Linux operating system, including directory structure, file
  294. location, and release disk format.
  295.  
  296. Requests to be added to this list must be sent to:
  297.           linux-standards-request@banjo.concert.net
  298.  
  299. QUESTION: Does there exist a place where the traffic of the
  300. mailing-list and newsgroup is kept?
  301.  
  302. ANSWER: Yes, on nic and tsx-11 (see the ftp adresses above)
  303.  
  304. III. INSTALLATION and SECURITY 
  305. ==============================
  306.  
  307. QUESTION: How can I be sure I won't be writing over anything
  308. important?  I have to use DOS on my machine, and I don't want to
  309. lose any files.
  310.  
  311. ANSWER: Back up everything. Just in case. Then, write some easily
  312. recognizable pattern to the partition you have reserved for linux,
  313. using some DOS tool. You can then use "cat /dev/hdX" under linux to
  314. examine which of the partitions you used.
  315.  
  316.  
  317. QUESTION: Linux mkfs doesn't accept the size I give the device,
  318. although I double-checked with fdisk, and it's correct.
  319.  
  320. ANSWER: Be sure you give the size in BLOCKS, ie 1024 bytes, not
  321. sectors. The mkfs doesn't work for very big partition. Also, 
  322. make doubly certain that you have the correct partition.
  323.  
  324. There are a few rules about this: /dev/hd0 and /dev/hd5 are always the
  325. same under linux and minix.  DO NOT USE THEM, they are the whole raw
  326. disk, not partitions. Also if a partition is on drive 1 under minix
  327. (ie /dev/hd1-4), it is drive 1 under linux as well.  Moreover, there
  328. is no real consensus on whether partition #1 is the first partition on
  329. the disk, or is the first entry in the partition table.  Some parition
  330. programs sort this information on the screen only, some will write the
  331. sorted information back to the hard disk.  Linux assumes that the
  332. first entry is hd1, and so if some utility starts sorting/reordering
  333. the table these things can change.  
  334.  
  335. REMARK Minix does some reordering.
  336.  
  337. A useful hack is to make each of your partitions a different size.
  338. Then after any editting or possible change to the partition table you
  339. can boot a floppy system and run fdisk (linux's, not DOS) to see if
  340. the assignments still hold.
  341.  
  342.  
  343. QUESTION: I have a one partitionned 40Mb disk. If I run mkfs, what
  344. happens?
  345.  
  346. ANSWER: If you do that, you will have an empty 40Mb Linux file system
  347. (currently the same fs as Minix). You should, at least, make on your
  348. hard disk, one partition per operating system you want to use.
  349.  
  350.  
  351. QUESTION: I mounted the linux filesystem, and copied the files from
  352. the root-disk to the harddisk. Now I cannot find them any more, and
  353. somethimes linux dies with a "panic: trying to free unused inode".
  354.  
  355. ANSWER: You have probably forgot to sync before rebooting. Linux, like
  356. all unices, use a "buffer cache" to speed up reads and writes to disk.
  357. On a machine that has enough memory, this buffer-cache is 1.5MB, and
  358. if you forget to sync before exiting, it may not be fully written out
  359. to disk. Re-mkfs and re-install (or try to use the preliminary fsck,
  360. but remember that although fsck tries to correct the faults it finds,
  361. it may fail.)
  362.  
  363.  
  364. IV. LINUX and DOS 
  365. =================
  366.  
  367. QUESTION: Is it possible to access to DOS world from Linux
  368.  
  369. ANSWER: Yes, there is the mtools package (with patches for devices.c)
  370. The original sources of mtools can be found at any places not only at
  371. nic, tupac and tsx-11, and the patches for Linux (with fix for big DOS
  372. partitions are in the directory patches or ports). Moreover you should
  373. download the file patch.Z to apply patches :)
  374.  
  375. QUESTION: the mtools package won't work. I get an ENOENT error message
  376. for all devices.
  377.  
  378. ANSWER: mtools needs to be told which device to look for. Use 'ln' or
  379. 'mknod' to create a special file called "/dev/dosX", where X is A, B,
  380. C, X or Y. A and B are for floppies (12 bits), C is for hard disk and
  381. X, Y for any. This file should point to the device you want to read.
  382. About the minor/major pair have a look in section INSTALLATION HINTS.
  383.  
  384.  
  385. QUESTION: What is as86.tar.Z ?
  386.  
  387. ANSWER: It's the port of Bruce Evans' minix assembler, you need it to 
  388. be able to recompile Linux at your convenience.
  389.  
  390.  
  391. QUESTION: Turbo (Microsoft) Assembler won't compile the Linux boot
  392. code.  In fact, some of the opcodes in these files look completely
  393. unfamiliar.  Why?
  394.  
  395. ANSWER: The Linux boot codes are written in Bruce Evans' minix
  396. assembler, which has the same opcodes as the original minix assembler
  397. ported to linux get as86.tar.Z Anyway there are a few differences
  398. between these and normal DOS assemblers:
  399.  
  400.  - No segments - everything is in the same segment (at least in the
  401.    bootsectors and setup, as they don't use the .data segments)
  402.  
  403.  - mov[b|w|l] are shorter versions of mov ax,[byte|word|long] ptr
  404. [XXX].
  405.    This is how unix assemblers normally give the size (byte, word or
  406. long).
  407.    Gas has similar constructs.
  408.  
  409.  - There is no "jmp short", the opcodes are "j" for a short jump and
  410.    "jmp" for a long one.
  411.  
  412.  - "jmpi" is a jump with a segment:offset pair. I don't know how this
  413. is
  414.    written in DOS assembly.
  415.  
  416.  
  417. V. SOME CLASSICAL PROBLEMS 
  418. ==========================
  419.  
  420. QUESTION: While running du I get "Kernel panic: free_inode: bit
  421. already cleared".  Also, du produces a ENOENT error for all the files
  422. in certain of my directories.  What's going on?
  423.  
  424. ANSWER: These are both consistent with a bad file-system.  That's
  425. relatively easy to produce by not syncing before rebooting, as linux
  426. usually has 1.5MB of buffer space held in memory (unless you have <=4M
  427. RAM, in which case the buffers are only about 0.5MB). Also linux
  428. doesn't do anything special about the bit-map blocks, and as they are
  429. used often, those are the thing most likely to be in memory. If you
  430. reboot, and they haven't been written to disk ...
  431.  
  432. Just do an fsck on the device, the -a flag might repair it otherwise,
  433. the only thing to do is to reinstall the filesystem from the Images.
  434.  
  435. A sync is done only every 30 seconds normally (standard unix
  436. practice), so do one by hand (some people think you should do 3 syncs
  437. after each other, but that's superstition), or by logging out from the
  438. startup-shell, which automatically syncs the system. Unmounting a
  439. filesystem also syncs it (but of course you can never unmount root).
  440.  
  441. Another (sad) possibility is that you have bad blocks on your disk.
  442. Not very probable, as they would have to be in the inode-tables, just
  443. a couple of blocks in size. Again there aren't programs available to
  444. read a disk for bad sectors and put them in some kind of
  445. "bad-sector-file".  On IDE drives this is no problem (bad sectors are
  446. automatically mapped away).
  447.  
  448.  
  449. QUESTION: How can I partition my hard-drive to use Linux?
  450.  
  451. ANSWER: There are (at least) two ways to answer this. The easy way is
  452. probably to use a program which will do it for you, such as the MS-DOS
  453. fdisk, Minix fdisk, Xenix/Unix fdisk, or programs such as edpart.exe 
  454. or part.exe.
  455.  
  456. On the other hand, you can use a disk editor and modify the contents
  457. of the partition table directly. This has been already done, and an
  458. extensive explanatory note can be found in the mailing-list archives 
  459. (25th Jan. 92).
  460.  
  461.  
  462. QUESTION: What must I do to mkfs a floppy?
  463.  
  464. ANSWER: blocks are of size 1K so 1.44 floppy is 1440 blocks.
  465.  
  466.  
  467. QUESTION: When I run kermit under Linux, I get "Warning, Read access
  468. to lock directory denied". What am I doing wrong?
  469.  
  470. ANSWER: Nothing, you just need to create /usr/spool/uucp, which is
  471. where kermit like to lock files.
  472.  
  473.  
  474. QUESTION: du seems buggy when i used it the number of disk occupation
  475. is wrong.
  476.  
  477. ANSWER: Take care, if you want size in kbytes use the -k flags.
  478.  
  479.  
  480. QUESTION: du works just fine on directories, except on / and /dev,
  481. moreover "ls -l" returns big number on /dev. Why?
  482.  
  483. ANSWER: This is a "feature" added in Linux 0.12; it was originally
  484. present in Minix; more specifically, when you stat a device file
  485. belong to a block device, it will return the maximum size of the block
  486. device in the st_size member of the stat structure. If you don't like
  487. it, it's very simple to patch it out. Look in the fs/inode.c, in the
  488. subroutine read_inode().
  489.  
  490.  
  491. QUESTION: When I try to (un)compress many files in one command, the
  492. command partially fails?
  493.  
  494. ANSWER: This is a bug, many partial fixes are floating around but ..
  495. You can solve it by a bash command "for i in whateverfiles;do 
  496. compress $i; done"
  497.  
  498.  
  499. VI. INSTALLATION HINTS 
  500. ======================
  501.  
  502. QUESTION: I've got all the things on site ??? but I don't know what
  503. goes where.
  504.  
  505. ANSWER: include.tar.Z goes to /usr/include; ggcbin.tar.Z goes in
  506. /usr/local/lib except gcc which goes in /usr/local/bin. Moreover each
  507. gcc-xxx of /usr/local/lib should be linked with gxxx and xxx in
  508. /usr/local/bin.  system.tar.Z contains the latest sources of the
  509. system files (mkswap, mkfs, fsck and fdisk). In version 0.12
  510. utilbin.tar.Z has been replaced by fileutil.tar.Z and utils.tar.Z
  511. which contains a new tar to handle the symbolic links, make, uemacs
  512. kermit and minor programs (sed,...).  Other utilities have been ported
  513. separately.
  514.  
  515.  
  516. QUESTION: When I use the images, and i type "tar xvf ..." I got
  517. "command not found". What did I wrong?
  518.  
  519. ANSWER: Nothing, in the distribution the tar is in compressed form
  520. (lack of place). You have first to copy tar.Z on another disk/diskette
  521. and uncompress it, this command is available on your diskettes.
  522.  
  523.  
  524. QUESTION: What is the "em" binary?
  525.  
  526. ANSWER: Em is micro-EMacs (probably version 3.10).
  527.  
  528.  
  529. QUESTION: It seems that $#@! ported on linux don't run correctly
  530.  
  531. ANSWER: Possible, but check first if the size of your file corresponds
  532. to the one on the ftp sites, if it is then do a complete report of the
  533. error, try to correct it.
  534.  
  535.  
  536. QUESTION: Does anyone port this to linux?, if not i'll compile it
  537.  
  538. ANSWER: First check on the sites, have a look to the info-sheet
  539. monthly post and also available on sites. Have a look in the "old"
  540. digest files and mail-archives of linux-activists, these are kept at
  541. least at tsx-11 and nic possibly at tupac. Look also at the GNU(*)
  542. utilities to see if someone has already written a freely distribuable
  543. version. Ask then on the list/news.
  544.  
  545.  
  546. (*) GNU stands for GNU's Not Unix, which (besides being a recursive
  547. acronym) is a project started by the Free Software Foundation (the FSF)
  548. to write a freely distributable version of Unix.  The GNU kernel is
  549. named HURD, and is based on Mach.  It is currently being written, and is
  550. not yet done.  Many of the GNU utilities, however, are completed and are
  551. much more functional than the original Unix utilities.  Since they are
  552. freely available, Linux is using them as well.
  553.  
  554.  
  555. QUESTION: I've ported *** to Linux, what should i do to add it in the 
  556. standard distribution?
  557.  
  558. ANSWER: Read first the previous Q/A, then to make something available to
  559. others you have to post it (with cdiffs of the source, a short README if
  560. needed) in the incoming directory of one of nic,tupac,tsx-11, then drop
  561. a short note to the list/group and to the site advisor.  
  562. On nic    it's arl@sauna.cs.hut.fi (Ari Lemmke)
  563. On tupac  it's blum@cip-s01.informatik.rwth-aachen.de (Robert Blum)
  564. On tsx-11 it's tytso@athena.mit.edu (Ted Ts'o)
  565.  
  566.  
  567. QUESTION: I want to port *** to Linux, what are the flags?
  568.  
  569. ANSWER: Recall that Linux implements subset of SYSV and POSIX, so
  570. -DUSG and -DPOSIX work in general. Moreover throw away most of the ld
  571. flags such as -ltermcap, -lg, since the libg.a and libtermcap.a are
  572. missing.
  573.  
  574.  
  575. QUESTION: Linux lacks on ****/ Linux has a bug in ***, what are the
  576. rules to enhance/correct the kernel?
  577.  
  578. ANSWER: Before anything check if some one else is working on that
  579. subject, contact those people. Test your improvment (it should work is
  580. NOT enough), then send the patches in cdiffs form to Linus and/or the
  581. list, moreover the localization must be clear. This does NOT mean that
  582. bug-reports and patches are not accepted.
  583.  
  584.  
  585. QUESTION: I seem to be unable to compile anything with gcc. Why?
  586.  
  587. ANSWER: If you have only 2 MB RAM, gcc will die silently without
  588. compiling anything. You must have at least 4 MB to do compilations
  589.  
  590. BTW Since swapping is possible, I have heard that compilation is
  591. possible with only 2Meg and a lot disk traffic :) Isn't it great?
  592.  
  593. QUESTION: I'm using a program that uses signal handlers which are
  594. installed using sigaction() with the SA_NOMASK, and they get a general
  595. protection error right after the signal handler tries to return.
  596. What's going wrong?
  597.  
  598. ANSWER: You are using a libc.a that has an out-of-date signal.o and
  599. sig_restore.o file, and they don't know how to deal with SA_NOMASK.
  600. (The one in gccbin.tar.Z is out-of-date). Get the new libc.a and put
  601. it in /usr/lib or /usr/local/lib
  602.  
  603.  
  604. QUESTION: gcc complains about not finding crt0.o and the system
  605. include files What am I doing wrong ?
  606.  
  607. ANSWER: The include files normal place is in /usr/include. libc.a and
  608. *.a should be in /usr/lib or /usr/local/lib
  609.  
  610.  
  611. QUESTION: While compiling some GNU packages gcc chocs on regex.c with
  612. an insn code, what can I do?
  613.  
  614. ANSWER: There is a little bug in the port of gcc, this will be
  615. corrected on the port of v2.0 (with g++). Right now throw away the -O
  616. flag (to compile regex) and every thing will be alright.
  617.  
  618.  
  619. QUESTION: I tried to port a /new/ version of gnu stuff. But in the
  620. linking phase, gcc complains about the missing libg.a.
  621.  
  622. ANSWER: Yes this is well known, throw away the flag -g that's all,
  623. anyway libg.a is /only/ for debugging purpose.
  624.  
  625.  
  626. QUESTION: I can't move directories under Linux, why ?, what can I do?
  627.  
  628. ANSWER: mvdir needs kernel resources which don't exist yet.  The
  629. reason the rename system call isn't implemented yet is that there are
  630. a couple of problems with it: it isn't as straightforward as you'd
  631. imagine. Race conditions, inclusion checking etc..
  632.  
  633. It will befinitely be in 0.13 or 14. It's not /that/ difficult, just
  634. needs a little thought. In the meantime, you might fake it with "cp
  635. +recursive" and "rm -rf". Be careful with that though..
  636. You can also write a bash script, which simulates the mvdir (really a
  637. good exercice :) )
  638.  
  639. This also appears to be the reason why mv's of sym links do not work
  640. properly.
  641.  
  642. BTW Linus has already done it for linux v0.12 it's a patch available
  643. in the digest10 vol #1 of alt.os.linux. 
  644.  
  645. QUESTION: What are the device minor/major numbers?
  646.  
  647. ANSWER: (early Linus mail Nov. 6th 91, last update Jan. 19th 92)
  648.         Memory devices: Major = 1 (characted devices) minor
  649. 0    /dev/ram 
  650. 1    /dev/mem 
  651. 2    /dev/kmem - not implemented (easy, but I haven't done it) 
  652. 3    /dev/null 
  653. 4    /dev/port (implemented, but untested - don't play with it)
  654.  
  655. example: "mknod /dev/null c 1 3"
  656.  
  657.  
  658.         Floppy disks: Major = 2 (block devices)
  659.  
  660. minor = drive + 4*type, drive = 0,1,2,3 for A,B,C or D-diskette
  661.  
  662. type    1: 360kB floppy in 360kB drive (5.25")
  663.     2: 1.2M floppy in 1.2M drive (5.25")
  664.     3: 360kB floppy in 720kB/1.44Mb drive (3.5")
  665.     4: 720kB floppy in 720kB/1.44Mb drive (3.5")
  666.     5: 360kB floppy in 1.2M drive (5.25")
  667.     6: 720kB floppy in 1.2M drive (5.25")
  668.     7: 1.44M floppy in 1.44M drive (3.5")
  669.  
  670. Thus minor nr for a 1.44Mb floppy in B is: 1 + 4*7 = 29, and to read
  671. an old 360kB floppy in a 1.2M A-drive you need to use minor= 0 + 4*5 
  672. = 20.
  673.  
  674. Example: "mknod /dev/PS0 b 2 28" (b for block: 2 for floppy, 28 for
  675. 1.44 in A)
  676.  
  677.  
  678.         Hard disks: Major = 3 (block devices) minor
  679. 0    /dev/hd0 - The whole hd0, including partition table sectors
  680. etc.  
  681. 1    /dev/hd1 - first partition on hd0 
  682. ...  
  683. 4    /dev/hd4 - fourth partition on hd0 
  684. 5    /dev/hd5 - The whole hd1, again including partition table info 
  685. 6    /dev/hd6 - first partition on hd1 
  686. ...  
  687. 9    /dev/hd9 - fourth partition on hd1
  688.  
  689. NOTE! Be /very/ careful with /dev/hd0 and /dev/hd5 - you seldom need
  690. them, and if you write to them you can destroy the partition tables:
  691. something you probably don't want.  The only things that use /dev/hd0
  692. are things like "fdisk" etc.
  693.  
  694. NOTE 2!! The names for hd's are the same as under minix, but I think
  695. minix orders the partitions in some way (so that the partition numbers
  696. will be in the same order as the partitions are physically on the
  697. disk).  Linux doesn't order anything: it has the partitions in the
  698. same order as in the partition table (ie /dev/hd1 might be physically
  699. after /dev/hd2).
  700.  
  701.             Tty's: Major = 4 (character devices) minor
  702. 0    /dev/tty0     - general console 1 -
  703. 63            - reserved for virtual console
  704. 64-127            - reserved for serial io
  705. 128-            - reserved for pty's
  706.  
  707. And more particularly we have: 
  708. 64    /dev/tty64     - com1
  709. 65    /dev/tty65     - com2
  710.  
  711.  
  712. QUESTION: How to start Linux from drive B?
  713.  
  714. ANSWER: There is a DOS utility called boot_b.exe (look at DOS ftp).
  715. Another simple way is to open the box and invert the cables.
  716.  
  717. QUESTION: The program boot_b works fine /but/ once the first disk is
  718. read the system go back to the first drive, any hints?
  719.  
  720. ANSWER: Yes, change the bootimage in just the same way that you change
  721. it to boot on the hard drive, execept that the major/minor pair is
  722. different. All these information are in the file INSTALL-0.10.
  723. Remember that if you use a sun or other endian machine, you will need
  724. to reverse the byte order when you run the filter program (also in the
  725. same file).
  726.  
  727.  
  728. VII. FEATURES 
  729. =============
  730.  
  731. QUESTION: I've read that linux has virtual consoles, what must I do to
  732. get them?
  733.  
  734. ANSWER: Yes there are, you can access them with the left <alt>-key
  735. together with <Fn>-key. But first you have to activate them with doshell
  736. /dev/ttyn /bin/sh & where n is the number of the Virtual console.
  737. With the Linux 0.12 Images distribution, two consoles are available,
  738. but if you want to use the second do first: 
  739.              "doshell /dev/tty2 /bin/sh&"
  740. Moreover if you want to activate automatically the Virtual console,
  741. you should add this command in the /etc/rc file.
  742.  
  743. BTW: the serial ports are now /dev/tty64 and /dev/tty65. tty0 is the
  744. general console. tty128- are reserved to pty's
  745.  
  746.  
  747. QUESTION: What kind of shell is /bin/sh ?
  748.  
  749. ANSWER: It's the Bourne Again Shell, If you are interested in the
  750. version just type sh -version and you get the response
  751.  
  752.  
  753. QUESTION: Does there exist a man page for **** ?
  754.  
  755. ANSWER: Download man.tar.Z from your favorite linux ftp site, there is
  756. most of the fileutils man page -- either **** or g****, example there
  757. is nothing on ld, but there is for gld :) --, check the whatis
  758. database provided. The files in the cat1 dir are pre-formatted man
  759. pages that the man program can use.
  760.  
  761. BTW there is no roff,troff nor nroff for Linux.
  762.  
  763.  
  764. QUESTION: What are the editors available in linux
  765.  
  766. ANSWER: Right now there are uemacs and elvis-1.4, some one (R. Blum)
  767. is working on some other vi clone. The port of emacs 18.57 has been
  768. done by John T Kohl, files can be found at the different sites
  769. at nic         it's in the directory xtra
  770. at tsx-11    it's in the directory ports/emacs-18.57.
  771.  
  772.  
  773. QUESTION: Does there exist a printer package for Linux?
  774.  
  775. ANSWER: There are lp patches for linux.0.12, which implement a
  776. parallel printer interface and feature a greatly improved driver
  777. design. the patches are in lp.12.tar.Z
  778.  
  779.  
  780. QUESTION: Does there exist a ps for Linux?
  781.  
  782. ANSWER: Yes in the vc2.tar.Z file, however the command is very kludgy.
  783.  
  784. QUESTION: It's nice to have the df utility, but it would be nicer if
  785. it would give statistics of the root file system. Would it be
  786. difficult to do?
  787.  
  788. ANSWER: surely not, in your file /etc/rc, instead of the line
  789.             > etc/mtab
  790. put the following
  791.               echo "/dev/hdX (root)" > /etc/mtab
  792. where the X is the hard drive you use as root partition. 
  793.  
  794.  
  795. QUESTION: How do I make swapping work?, when I boot I get the
  796. following message: "Unable to get size of swap device"
  797.  
  798. ANSWER: There are two ways (as far as I know). Recompile the kernel
  799. and makes the swap device available (have a look in the main
  800. Makefile). Or else you can modify the bootimage, in that case you have
  801. to put a full device number in the word reserved for the swap device:
  802. the logic is the same as for the root device. Thus, if you want
  803. /dev/hd2 to be your swap-device, you'll have to write a 2 (minor nr)
  804. into byte 506, and a 3 (= harddisk) into byte 507. You can use
  805. virtually the same program as for the root-device (look in INSTALL
  806. files). 
  807.  
  808.  
  809. QUESTION: When I boot I get one of the following messages:
  810. "Unable to find swap signature" or "Bad swap-space bitmap"
  811.  
  812. ANSWER: You probably forgot to make your swap-device, use the mkswap
  813. command. 
  814.  
  815.  
  816. QUESTION: How do I know if it is swapping?
  817.  
  818. ANSWER: You will notice it :)) First of all, Linux tells you at boot
  819. time, "Adding swap: XXX pages of swap space", and if you start running
  820. out of memory, you will notice that the disk will work overtime, and
  821. things slow down. Generally a 2Meg RAM will make the system swap
  822. constantly while running gcc, 4 Meg will swap occasionnaly when
  823. optimizing big files (and having other things active, such as make).
  824.  
  825.  
  826. QUESTION: Is there only the %$#@ keyboard ?
  827.  
  828. ANSWER: There are Finnish, French, German, UK, and US keyboards.  Set
  829. it in linux/kernel/chr_drv/keyboard.S, then compile the kernel again.
  830.  
  831. BTW a Dannish keyboard patch (Tommy Thorn) is now available look the
  832. digest19 vol#1 file.
  833.  
  834.  
  835. QUESTION: Does there exist shared libs ?
  836.  
  837. ANSWER: They seem to work. The kernel features are in Linux 0.12
  838. already. 
  839.  
  840.  
  841. QUESTION: Does Linux permit/support bitmapped graphics on vga/svga 
  842. cards?
  843.  
  844. ANSWER: No, there is no interface for graphics operations on Linux
  845. (yet). 
  846.  
  847. QUESTION: There are a lot of patches available (fd patch, lp patch
  848. login patch ...) can I be fairly confident the subsequent patches will
  849. work?
  850.  
  851. ANSWER: No you can't, patching is a real beta tester art :)). People 
  852. are not working on the same patched release, so you have to check if 
  853. the patches you already applied works on the same kernel part, if not,
  854. /great/, just apply them. If yes, check if there is an order, patch
  855. creator knows that, and (should) try to warn patch user (in other
  856. words: beta tester) otherwise you should edit the patch files (and
  857. possibly make a brief note to others on this list/newsgroup or even 
  858. a cdiff) before applying them, another solution is to keep cool and 
  859. wait for the next version of Linux where, in general, the 
  860. modifications have been done but this behavior is /not/ Linux
  861. helpful. 
  862.  
  863.  
  864. QUESTION: I got the patches on some ftp sites, and applied them to the
  865. kernel and tried to compile. It didn't !!. Are the patches buggy?
  866.  
  867. ANSWER: Before remake, just do a make clean in the directories
  868. involved by the patches. This will force a rebuild of the .o and .a
  869. files. 
  870. If you have a RCS running on your source tree, did you checked a
  871. patched version of the files changed before /any/ CO either by you or
  872. make
  873.  
  874.        ===================8<==========>8================
  875.  
  876.  
  877.  
  878.  
  879.             Marc
  880.  
  881.